<template>
    <div>
        <div id="box"></div>
    </div>
</template>
<script>
export default {
    mounted() {
        var chartDom = document.getElementById('box');
        var myChart = this.$echarts.init(chartDom);
        var option;

        option = {
            xAxis: {
                data: ['A', 'B', 'C', 'D', 'E']
            },
            yAxis: {},
            series: [
                {
                    data: [10, 22, 28, 43, 49],
                    type: 'bar',
                    stack: 'x'
                },
                {
                    data: [5, 4, 3, 5, 10],
                    type: 'bar',
                    stack: 'x'
                }
            ]
        };

        option && myChart.setOption(option);
    }
}



</script>
<style scoped>
#box {
    width: 500px;
    height: 500px;
}
</style>